package demo.aj;

public aspect JedisAspect {

    //pointcut JedisCostTime():call(* redis.clients.jedis.BinaryClient.*(..,*));
//    pointcut JedisCostTime():call(* redis.clients.jedis.Jedis.*(..,*));

    pointcut JedisCostTime():
      execution(* (redis.clients.jedis.BinaryJedis+).*(*,..));

    Object around() :JedisCostTime(){
        long start = System.currentTimeMillis();
        Throwable throwable = null;
        Object retVal = proceed();
        long cost = System.currentTimeMillis() -start;
        System.out.println("[JedisCostTime]方法: 【" + thisJoinPoint.getSignature() + "】结束，用时: " + cost + "ms");
        return retVal;
    }
}
